package com.fingard.dsp.bank.reqrespobj.relationdn;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.relationdn.detail.ReqRelationDNDetail;
import com.fingard.xml.XmlTextReader;

public class ReqRelationDN extends RequestBase {

    private XmlTextReader xmlReader;

    public boolean isBatch = false;//是否为批量查询

    public int detailCount = -1;

    //操作员编号
    public String UserId = "";

    /**
     * 组织机构代码
     */
    public String org = "";

    public ReqRelationDNDetail readedDetail;


    public ReqRelationDN(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
        init(p_xmlReader, p_header);
    }

    public void init(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
        reqHeader = p_header;
        xmlReader = p_xmlReader;

        detailCount = xmlReader.countElement(PATH_Detail);
        //savingType = xmlReader.getSimpleText("SavingType");
        if (detailCount > 0) {
            isBatch = true;
        } else {
            isBatch = false;
            detailCount = 1;
        }

//        UserId = xmlReader.getSimpleText("OprtNo");
        org = xmlReader.getSimpleText("EntIdNo");
    }

}
